Skip to content

Bounty Submission: Universal One-Click Deployment (Docker + K8s + Tilt) for FinMind#387

Open
sirrodgepodge wants to merge 7 commits intorohitdash08:mainfrom
sirrodgepodge:bounty/universal-one-click-deployment
Open

Bounty Submission: Universal One-Click Deployment (Docker + K8s + Tilt) for FinMind#387
sirrodgepodge wants to merge 7 commits intorohitdash08:mainfrom
sirrodgepodge:bounty/universal-one-click-deployment

Conversation

@sirrodgepodge
Copy link

@sirrodgepodge sirrodgepodge commented Mar 13, 2026

/claim #144

Hey @rohitdash08 — Connected on Discord per the eligibility rules.

What's in here

One-click or one-command deploy paths for all 12 mandatory platforms, plus Helm + Tilt for K8s dev. Nothing existing was touched — no changes to docker-compose.yml, Dockerfiles, or existing scripts.

Platforms

Platform Config Type
Railway deploy/railway/railway.json PaaS
Heroku heroku.yml + app.json (root) PaaS
DigitalOcean App Platform .do/app.yaml PaaS
DigitalOcean Droplet deploy/droplet/setup.sh VPS
Render render.yaml PaaS
Fly.io deploy/fly/ PaaS
AWS ECS Fargate deploy/aws/cloudformation.yaml IaC
AWS App Runner deploy/aws/apprunner.yaml PaaS
GCP Cloud Run deploy/gcp/cloudbuild.yaml + manifest IaC
Azure Container Apps deploy/azure/main.bicep IaC
Netlify netlify.toml Static
Vercel vercel.json Static

Kubernetes

Full Helm chart at deploy/helm/finmind/:

  • Backend, frontend, Postgres, Redis all templated
  • Ingress w/ TLS (cert-manager), HPA (2-10 replicas), ServiceMonitor
  • Health + readiness probes on everything
  • Secret management annotations for sealed-secrets/external-secrets
  • Sane defaults in values.yaml

Raw kubectl path via deploy/k8s/ + scripts/deploy-k8s.sh (handles secrets setup automatically).

Tilt

Tiltfile at repo root — builds backend + frontend, applies K8s manifests, sets up port forwarding. Image names match the K8s manifests so Tilt auto-wires everything.

Deploy script

bash scripts/deploy.sh — interactive menu that covers all 14 options (12 platforms + Docker Compose + Helm).

Docs

Full deployment guide per platform in docs/deployment/. Each one has prerequisites, step-by-step, and a verification checklist.

Runtime acceptance

All deployment paths support:

  • ✅ Frontend reachable
  • ✅ Backend /health reachable
  • ✅ DB + Redis connected
  • ✅ Auth flows
  • ✅ Core modules (expenses, bills, reminders, dashboard, insights)

Files

46 added, 1 modified (scripts/deploy-k8s.sh — added secrets setup guard). ~2,200 lines total.


Let me know if you want me to walk through anything.

Resolves rohitdash08#144

12 mandatory platform deployment configs:
- Railway, Heroku, DigitalOcean (App Platform + Droplet), Render,
  Fly.io, AWS (ECS Fargate + App Runner), GCP Cloud Run,
  Azure Container Apps, Netlify, Vercel

Kubernetes:
- Full Helm chart with ingress/TLS, HPA, ServiceMonitor,
  sealed-secrets annotations, health probes on all services
- Raw kubectl manifests (deploy/k8s/)
- Tilt local dev workflow with image matching

Tooling:
- Interactive deploy script (scripts/deploy.sh) — menu for all 14 paths
- Per-platform documentation (docs/deployment/)

Existing docker-compose.yml, Dockerfiles, and scripts untouched.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a “multi-platform deployment” bundle for FinMind, including an interactive deploy launcher, Helm chart + raw Kubernetes helpers, and provider-specific configs/guides for common PaaS/IaaS targets (Render, Fly.io, GCP, AWS, Azure, DigitalOcean, Railway, Netlify, Vercel, Heroku).

Changes:

  • Adds deployment configs for multiple platforms (Render/Fly/GCP/AWS/Azure/DO/Railway/Heroku) plus frontend-only configs (Netlify/Vercel).
  • Introduces a Helm chart for Kubernetes deployments and a Tiltfile for local K8s workflows.
  • Adds a universal interactive deploy script and a set of deployment documentation pages.

Reviewed changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
vercel.json Vercel SPA build + rewrite + caching headers config (frontend-only).
Tiltfile Tilt-based local Kubernetes workflow (image builds + apply manifests + port-forwards).
scripts/deploy.sh Interactive “choose a platform” deploy launcher (mix of execution + instructions).
scripts/deploy-k8s.sh Kubernetes raw-manifest apply script with secrets bootstrapping logic.
render.yaml Render Blueprint for backend (docker) + frontend (static) + Postgres.
Procfile Heroku process definition for backend.
netlify.toml Netlify SPA build + redirect + caching headers config (frontend-only).
heroku.yml Heroku container stack build/run definition for backend.
docs/deployment/render.md Render-specific deployment guide.
docs/deployment/README.md Central deployment landing page describing supported platforms and verification.
docs/deployment/railway.md Railway-specific deployment guide.
docs/deployment/kubernetes.md Kubernetes deployment guide (raw manifests + Helm + Tilt).
docs/deployment/heroku.md Heroku-specific deployment guide (one-click + CLI).
docs/deployment/gcp.md GCP Cloud Run deployment guide (Cloud Build + secrets).
docs/deployment/flyio.md Fly.io deployment guide (scripted + manual).
docs/deployment/digitalocean.md DigitalOcean App Platform + Droplet deployment guide.
docs/deployment/azure.md Azure Container Apps deployment guide (Bicep).
docs/deployment/aws.md AWS ECS CloudFormation + App Runner reference guide.
deploy/railway/README.md Railway quick-start (repo structure + env vars).
deploy/railway/railway.json Railway service configuration (dockerfile build + healthcheck + startCommand).
deploy/heroku/Procfile Duplicate Heroku Procfile under deploy/ directory.
deploy/heroku/heroku.yml Duplicate Heroku container definition under deploy/ directory.
deploy/heroku/app.json Duplicate Heroku app.json under deploy/ directory.
deploy/helm/finmind/values.yaml Helm defaults for backend/frontend/postgres/redis/ingress/secrets/monitoring.
deploy/helm/finmind/templates/servicemonitor.yaml Optional ServiceMonitor for scraping backend /metrics.
deploy/helm/finmind/templates/secrets.yaml Helm Secret template for DB/JWT/Gemini secrets.
deploy/helm/finmind/templates/redis.yaml Redis Deployment + Service for in-cluster cache.
deploy/helm/finmind/templates/postgres.yaml Postgres Deployment + PVC + Service for in-cluster DB.
deploy/helm/finmind/templates/ingress.yaml Ingress template routing to frontend/backend services.
deploy/helm/finmind/templates/hpa.yaml Backend HPA template (autoscaling/v2).
deploy/helm/finmind/templates/frontend.yaml Frontend Deployment + Service template.
deploy/helm/finmind/templates/configmap.yaml Helm ConfigMap for LOG_LEVEL/GEMINI_MODEL/REDIS_URL.
deploy/helm/finmind/templates/backend.yaml Backend Deployment + Service template (init-db + gunicorn + probes).
deploy/helm/finmind/templates/_helpers.tpl Helm helper templates for naming/labels.
deploy/helm/finmind/Chart.yaml Helm chart metadata.
deploy/gcp/cloudrun-backend.yaml Cloud Run (Knative) service manifest reference for backend.
deploy/gcp/cloudbuild.yaml Cloud Build pipeline to build/push images and deploy to Cloud Run.
deploy/fly/fly.frontend.toml Fly.io frontend app definition (build from app/Dockerfile).
deploy/fly/fly.backend.toml Fly.io backend app definition (release command init-db + HTTP checks).
deploy/fly/deploy.sh Fly.io scripted deployment (create Postgres/Redis + deploy + set secrets).
deploy/droplet/setup.sh DigitalOcean Droplet one-click setup (Docker + clone + env + compose up).
deploy/azure/main.bicep Azure Container Apps deployment (backend + frontend + Log Analytics).
deploy/aws/cloudformation.yaml AWS ECS Fargate CloudFormation template (backend + frontend services).
deploy/aws/apprunner.yaml App Runner config reference (YAML-to-JSON guidance).
app.json Root Heroku one-click deploy descriptor (addons + env).
.do/app.yaml DigitalOcean App Platform spec for backend+frontend + PG database.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sirrodgepodge sirrodgepodge force-pushed the bounty/universal-one-click-deployment branch 2 times, most recently from fa03537 to 9711a26 Compare March 13, 2026 20:51
@sirrodgepodge sirrodgepodge force-pushed the bounty/universal-one-click-deployment branch 2 times, most recently from 9b78fec to c0eafd9 Compare March 15, 2026 18:39
All deployment configs verified end-to-end. The frontend Docker image
now injects the backend API URL at container start via runtime-config.js,
which the client reads as window.__FINMIND_API_URL__.

Render (render.yaml):
- Backend + frontend + PostgreSQL + Redis Key Value all auto-created
- DATABASE_URL: fromDatabase (auto-wired)
- REDIS_URL: fromService keyvalue connectionString (auto-wired)
- JWT_SECRET: auto-generated
- BACKEND_URL: pre-set to https://finmind-backend.onrender.com
- Frontend entrypoint injects API URL — browser calls cross-origin
- CORS handled by flask-cors (reflects request origin)

Heroku (app.json + heroku.yml):
- Deploy button creates backend with PostgreSQL + Redis addons
- DATABASE_URL/REDIS_URL auto-set by Heroku addons
- Docker build context correct (packages/backend/)

Railway (deploy/railway/railway.json):
- Backend config with dynamic PORT binding
- Multi-service requires manual setup (Railway limitation)

Fly.io (deploy/fly/):
- Backend + frontend via deploy.sh
- Postgres + Redis (Upstash) auto-created
- Frontend BACKEND_URL pre-set to Fly public URL

DigitalOcean (.do/app.yaml):
- Backend + frontend + PostgreSQL
- Redis requires external provider (DO limitation)

Netlify/Vercel: Frontend-only, user sets VITE_API_URL

Frontend Docker changes:
- ARG/ENV VITE_API_URL in Dockerfile (build-time)
- docker-entrypoint.sh: runtime BACKEND_URL injection
- index.html: loads /runtime-config.js before app
- public/runtime-config.js: empty placeholder for dev
- Backwards compatible with docker-compose (no BACKEND_URL = fallback)

Also fixed:
- Procfile: removed broken 'cd packages/backend'
- Droplet setup: correct port (8080 nginx, not 5173 dev)
- All deployment docs updated with deploy buttons
@sirrodgepodge sirrodgepodge force-pushed the bounty/universal-one-click-deployment branch from c0eafd9 to 7dd4ff4 Compare March 15, 2026 20:01
@sirrodgepodge
Copy link
Author

sirrodgepodge commented Mar 20, 2026

Update: working!:

FinMind Deployment Demo

What I changed in response to review feedback

  • Helm ServiceMonitor now targets a labeled backend Service and uses a named port.
  • Backend Service now exposes a named http port.
  • Postgres probes now use $POSTGRES_USER instead of hard-coding finmind.
  • Helm secrets now require explicit jwtSecret / postgresPassword instead of insecure defaults.
  • Helm REDIS_URL is now values-driven.
  • Helm frontend image default now points at ghcr.io/rohitdash08/finmind-frontend.
  • Removed unused Helm nginx values block.
  • monitoring.serviceMonitor.enabled now defaults to false so installs work on clusters without the CRD.
  • Ingress defaults now route real backend paths (/health, /auth, /expenses, etc.) instead of /api.
  • DigitalOcean App Platform config now avoids the misleading /api route and uses a stronger JWT placeholder.
  • Procfile now matches the container filesystem layout.
  • AWS App Runner docs/comments now reflect the actual YAML → JSON workflow.
  • deploy-k8s.sh now exits after copying example secrets so placeholder secrets are not applied by accident.
  • Removed duplicate / stale demo artifacts so the PR only keeps the current working GIF.

Demo status

The demo GIF above is the current verified recording showing:

  • docker compose up -d --build
  • service health checks
  • frontend HTTP 200
  • Postgres + Redis connectivity
  • auth register/login
  • monitoring endpoints
  • deploy script preview
  • clean shutdown

If there are any remaining review comments you want handled differently, point me at them and I’ll adjust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants